//============================================================================
// Name        : Conc_Opdr3.cpp
// Author      : Nivard Koskamp en Pleun Willemsen
// Version     :
// Copyright   : Saxion - Informatica
// Description : Hello World in C++, Ansi-style
//============================================================================

#include "Conc_Opdr3.h"


int main() {
	cout << "Concurrency Opdracht 3 van Nivard en Pleun" << endl; // prints Concurrency Opdracht 3



	BufferSysteem* bs = new BufferSysteem();

	IOcard* io1 = new IOcard(1,bs);
	IOcard* io2 = new IOcard(2,bs);
	IOcard* io3 = new IOcard(3,bs);

	io1->start();
	io2->start();
	io3->start();

	Merger* m1 = new Merger(1,io1);
	Merger* m2 = new Merger(2,io2);
	Merger* m3 = new Merger(3,io3);

	m1->start();
	m2->start();
	m3->start();

	Wereld* w = new Wereld(1);



	Camera* c1 = new Camera(1,m1,w);
	Camera* c4 = new Camera(4, m1, w);
	Camera* c7 = new Camera(7, m1, w);

	Camera* c2 = new Camera(2, m2, w);
	Camera* c5 = new Camera(5, m2, w);
	Camera* c8 = new Camera(8, m2, w);

	Camera* c3 = new Camera(3, m3, w);
	Camera* c6 = new Camera(6, m3, w);
	Camera* c9 = new Camera(9, m3, w);

	c1->start();
	c2->start();
	c3->start();
	c4->start();
	c5->start();
	c6->start();
	c7->start();
	c8->start();
	c9->start();

	w->start();

	Panorama* pana = new Panorama(bs);

	pana->start();

	Thread::msleep(300000);
	cout << "Klaar" << endl;

	return 0;
}
